<%-- 添加拍卖预展资料jsp片断   --%>
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>

<!-- 作品列表 二十宫格  begin  -->

<%@page import="java.util.List"%>
<%@page import="com.compty.core.page.Page"%>
<%@page import="com.compty.paint.domain.Painting"%>
<%@page import="com.compty.paint.domain.ImageInfo"%>

<div style="width: 958px;border: 1px solid #ccc;margin: 0 auto;overflow: hidden;background: #fff">
<div style="padding-left: 30px;float: left;padding-top:15px;text-align:center;font-family: 宋体;font-size: 14px;color: #666666;">为使预展画册与现场画册保持一致，请依据拍卖会印刷画册内页顺序依次上传</div>
<div style="font-family: 宋体;font-size: 12px;text-align: right;padding-right: 30px;padding-top:15px;"><a href="javascript:showNextPagePic_auction(-1)">上一页</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:showNextPagePic_auction(1)">下一页</a></div>
<div style="float: left;clear: both;">
<%
	Page p = (Page)request.getAttribute("page"); 
	int len = 0;
	if( p != null ){
		List list = (List)p.getResult();
		len = list.size();
	}
	
	for(int i = 1 ; i <= 20 ;i++){
		if(i % 4 == 1){
%>
<div style="clear: both;padding-left: 22px;">
<%}
		if(i <= len ){
			List list = (List)p.getResult();
			ImageInfo imageInfo = (ImageInfo)list.get(i-1);
			int margin_right = 0;
			if( i % 4 > 0 ){
				margin_right = 24;
			}
		%>
	<div style="float: left;margin-top: 15px;margin-right: <%=margin_right %>px;">
	 	<div style="background: url('../images/wkA.gif');width: 210px;height: 250px;">
			 <div style="background: url('${img_server}/auction/<%=imageInfo.getId() %>.<%=imageInfo.getSuffix() %>') center center;position: relative;width: 185px;height: 225px;margin-top: 7px;margin-left: 7px;"></div>
        </div>
       <div style="font-family: 宋体;font-size: 12px;text-align: center;padding-top: 10px;color: blue">
	       <a name="modifyHref" title="<%=imageInfo.getId() %>">修改</a>&nbsp;&nbsp;
	       <a href="auctionAction!deleteImage.do?imageId=<%=imageInfo.getId() %>&id=${auction.id }&curPage=<s:property value="page.pageNo" />">删除</a>
       </div>
   </div>
 <%}
  else{ 
	 if(i % 4 == 0 ){%> <%-- 占位符  一行末尾  --%>
		<div style="background: url('../images/wkA.gif');float: left;width: 210px;height: 250px;line-height:250px;text-align: center;margin-top: 15px;">
			   <a name="addPaintingHref" style="font-size: 14px;font-family:宋体;color: red;cursor: pointer;">添加图片</a>
		</div>
<%}else{ %> <%-- 占位符  非一行末尾  --%>
		<div style="background: url('../images/wkA.gif');float: left;width: 210px;height: 250px;line-height:250px;margin-right: 24px;text-align: center;margin-top: 15px;">
				  <a name="addPaintingHref" style="font-size: 14px;font-family:宋体;color: red;cursor: pointer;">添加图片</a>
		</div>
 <%}
} %>
<% if( i % 4 == 0){ %>
</div>
<%} %>
<%		
}
%>
</div>
<div style="clear: both;font-family: 宋体;font-size: 12px;text-align: right;padding-top: 5px;padding-bottom: 5px;padding-right: 30px;"><a href="javascript:showNextPagePic_auction(-1)">上一页</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:showNextPagePic_auction(1)">下一页</a></div>
<!-- 隐藏域 begin  -->
	<input type="hidden" value="<s:property value="page.pageCount" />" name="totalPages_Hidden" id="totalPages_Hidden" />
	<input type="hidden" value="<s:property value="page.pageNo" />" name="curPage" id="curPage" />
<!-- 隐藏域  end  -->		
</div>
<!-- 作品列表 八宫格  end  -->